This report contains the data analysis from the 2021 PGR greenshouse in PGF. The data was collected in 2021. This file is a combination of field data (growth, harvest, and shattering).
This file has been written as a Jupyter Notebook.
import numpy as np
import pandas as pd
# ggplot's cousin
from plotnine import *
from matplotlib import pyplot as plt
from matplotlib import cm
import seaborn as sns
# import joypy # For ridgeline plots
# Make sure Jupyter Notebook shows all outputs from the same cell
from IPython.core.interactiveshell import InteractiveShell
InteractiveShell.ast_node_interactivity = "all"
# Set max number of rows to visualize
pd.set_option('display.max_rows', 10)
# plt.rcParams['figure.figsize'] = [12, 8]
plt.rcParams['figure.dpi'] = 80
flip_xlabels = theme(axis_text_x = element_text(angle=90, hjust=1))
FD = pd.read_csv ('.\CURATED\PGRGH2021_FieldData_Compiled.csv')
print(FD.columns)
FD
Index(['Block', 'Plot', 'Tray', 'Treatment', 'VisShatt', 'Range',
'Shaken_SPKS', 'Pre-Detached_SEED', 'TOTAL_Undetached', 'Detached_SEED',
'Undetached_SEED', 'NotesShake', 'AVG_Shatt_SPK', 'AVG_Retent_SPK',
'AVG_AdjShatt_SPK', 'POT_Yld_SPK', 'PCTG_YldLoss', 'PCTG_YldLoss_SPK',
'Dry_Unthreshed', 'Dry_Threshed', 'NotesDry', 'WET_wgt', 'SMC_Unthr',
'Est_Debris', 'Column', 'Row', 'G1_Apr07', 'G2_Apr16', 'G3_Apr19',
'G4_Apr21', 'G5_Apr23', 'G6_Apr28', 'G7_May03', 'Tallest',
'AverageHeight', 'AUC_Gust'],
dtype='object')
| Block | Plot | Tray | Treatment | VisShatt | Range | Shaken_SPKS | Pre-Detached_SEED | TOTAL_Undetached | Detached_SEED | ... | G1_Apr07 | G2_Apr16 | G3_Apr19 | G4_Apr21 | G5_Apr23 | G6_Apr28 | G7_May03 | Tallest | AverageHeight | AUC_Gust | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B2 | p0391 | 21 | T1:Water | 2.5 | 5.0 | 12.0 | 0.118 | 0.782 | 0.122 | ... | 31.0 | 45.0 | 53.0 | 55.0 | 58.0 | 65.0 | 65.0 | 48.0 | 36 | 207.607428 |
| 1 | B2 | p0615 | 35 | T1:Water | 2.5 | 5.0 | 12.0 | 0.019 | 0.655 | 0.027 | ... | 45.0 | 56.0 | 61.0 | 65.0 | 65.0 | 65.0 | 69.0 | 64.0 | 50 | 210.385206 |
| 2 | B2 | p0655 | 39 | T1:Water | 2.5 | 5.0 | 12.0 | 0.057 | 0.764 | 0.045 | ... | 45.0 | 56.0 | 59.0 | 65.0 | 65.0 | 65.0 | 69.0 | 61.0 | 42 | 210.385206 |
| 3 | B2 | p0647 | 36 | T1:Water | 5.0 | 10.0 | 12.0 | 0.035 | 0.816 | 0.060 | ... | 45.0 | 45.0 | 52.0 | 57.0 | 59.0 | 65.0 | 69.0 | 56.0 | 45 | 209.162984 |
| 4 | B2 | p0445 | 24 | T1:Water | 2.5 | 5.0 | 12.0 | 0.012 | 0.739 | 0.026 | ... | 40.0 | 45.0 | 45.0 | 52.0 | 57.0 | 59.0 | 69.0 | 66.0 | 52 | 208.607428 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 123 | B2 | p0643 | 40 | T1:Water | 6.5 | 7.0 | 13.0 | 0.184 | 1.040 | 0.133 | ... | 45.0 | 51.0 | 54.0 | 57.0 | 59.0 | 65.0 | 65.0 | 68.0 | 52 | 209.829650 |
| 124 | B3 | p1009 | 57 | T1:Water | 1.5 | 3.0 | 12.0 | 0.020 | 0.590 | 0.005 | ... | 31.0 | 45.0 | 52.0 | 52.0 | 54.0 | 65.0 | 69.0 | 65.0 | 51 | 207.607428 |
| 125 | B3 | p0925 | 54 | T1:Water | 1.0 | 2.0 | 12.0 | 0.019 | 1.445 | 0.016 | ... | 31.0 | 45.0 | 52.0 | 57.0 | 59.0 | 59.0 | 65.0 | 86.0 | 69 | 207.607428 |
| 126 | B3 | p1079 | 60 | T1:Water | 2.5 | 5.0 | 12.0 | 0.000 | 0.488 | 0.008 | ... | 45.0 | 57.0 | 58.0 | 65.0 | 65.0 | 69.0 | 69.0 | 55.0 | 44 | 210.496317 |
| 127 | B3 | p1075 | 59 | T1:Water | 15.0 | 10.0 | 14.0 | 0.042 | 0.500 | 0.020 | ... | 40.0 | 52.0 | 57.0 | 65.0 | 65.0 | 65.0 | 69.0 | 54.0 | 43 | 209.385206 |
128 rows × 36 columns
FD_gb = FD.groupby(['Block', 'Treatment']).size().unstack(level=0)
# FD_gb = FD.groupby(['Treatment']).size()
FD_gb.plot(kind = 'bar')
<AxesSubplot:xlabel='Treatment'>
FD.groupby(['Block', 'Treatment'])['SMC_Unthr'].describe()
| count | mean | std | min | 25% | 50% | 75% | max | ||
|---|---|---|---|---|---|---|---|---|---|
| Block | Treatment | ||||||||
| B2 | T1:Water | 8.0 | 0.103546 | 0.021349 | 0.075435 | 0.091212 | 0.097068 | 0.116925 | 0.136792 |
| T2:AVG_Low | 7.0 | 0.097835 | 0.035751 | 0.069231 | 0.078321 | 0.086460 | 0.098755 | 0.175000 | |
| T3:AVG_Med | 7.0 | 0.056747 | 0.021020 | 0.029070 | 0.042679 | 0.048649 | 0.076505 | 0.081140 | |
| T4:AVG_High | 6.0 | 0.082693 | 0.016517 | 0.062857 | 0.074353 | 0.081088 | 0.085845 | 0.111588 | |
| T5:ETH | 2.0 | 0.094404 | 0.012288 | 0.085714 | 0.090059 | 0.094404 | 0.098748 | 0.103093 | |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| B3 | T4:AVG_High | 9.0 | 0.068055 | 0.059071 | -0.080000 | 0.072238 | 0.082892 | 0.088268 | 0.130000 |
| T6:PrhxCa_Low | 9.0 | 0.117396 | 0.042129 | 0.078086 | 0.087379 | 0.115966 | 0.126050 | 0.217391 | |
| T7:PrhxCa_Med | 11.0 | 0.123009 | 0.095911 | 0.039823 | 0.085390 | 0.093168 | 0.108024 | 0.386364 | |
| T8:PrhxCa_High | 11.0 | 0.172807 | 0.278956 | 0.000000 | 0.068294 | 0.091837 | 0.134592 | 1.000000 | |
| T9:GA3 | 7.0 | 0.089699 | 0.022732 | 0.048023 | 0.078820 | 0.099668 | 0.104786 | 0.112994 |
17 rows × 8 columns
ggplot(FD, aes(x='Block', y='SMC_Unthr', fill = 'Treatment')) + geom_boxplot() + flip_xlabels
# ggplot(FD, aes(x='Block', y=FD['SMC_Unthr'], fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 2 rows containing non-finite values.
<ggplot: (129429225186)>
ggplot(FD, aes(x='Block', y=np.log10(FD['AVG_Shatt_SPK']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129429048483)>
# FD.droplevel('Treatment'=="T1:Water")
FD[FD["Treatment"]!="T5:ETH"]
| Block | Plot | Tray | Treatment | VisShatt | Range | Shaken_SPKS | Pre-Detached_SEED | TOTAL_Undetached | Detached_SEED | ... | G1_Apr07 | G2_Apr16 | G3_Apr19 | G4_Apr21 | G5_Apr23 | G6_Apr28 | G7_May03 | Tallest | AverageHeight | AUC_Gust | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B2 | p0391 | 21 | T1:Water | 2.5 | 5.0 | 12.0 | 0.118 | 0.782 | 0.122 | ... | 31.0 | 45.0 | 53.0 | 55.0 | 58.0 | 65.0 | 65.0 | 48.0 | 36 | 207.607428 |
| 1 | B2 | p0615 | 35 | T1:Water | 2.5 | 5.0 | 12.0 | 0.019 | 0.655 | 0.027 | ... | 45.0 | 56.0 | 61.0 | 65.0 | 65.0 | 65.0 | 69.0 | 64.0 | 50 | 210.385206 |
| 2 | B2 | p0655 | 39 | T1:Water | 2.5 | 5.0 | 12.0 | 0.057 | 0.764 | 0.045 | ... | 45.0 | 56.0 | 59.0 | 65.0 | 65.0 | 65.0 | 69.0 | 61.0 | 42 | 210.385206 |
| 3 | B2 | p0647 | 36 | T1:Water | 5.0 | 10.0 | 12.0 | 0.035 | 0.816 | 0.060 | ... | 45.0 | 45.0 | 52.0 | 57.0 | 59.0 | 65.0 | 69.0 | 56.0 | 45 | 209.162984 |
| 4 | B2 | p0445 | 24 | T1:Water | 2.5 | 5.0 | 12.0 | 0.012 | 0.739 | 0.026 | ... | 40.0 | 45.0 | 45.0 | 52.0 | 57.0 | 59.0 | 69.0 | 66.0 | 52 | 208.607428 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 123 | B2 | p0643 | 40 | T1:Water | 6.5 | 7.0 | 13.0 | 0.184 | 1.040 | 0.133 | ... | 45.0 | 51.0 | 54.0 | 57.0 | 59.0 | 65.0 | 65.0 | 68.0 | 52 | 209.829650 |
| 124 | B3 | p1009 | 57 | T1:Water | 1.5 | 3.0 | 12.0 | 0.020 | 0.590 | 0.005 | ... | 31.0 | 45.0 | 52.0 | 52.0 | 54.0 | 65.0 | 69.0 | 65.0 | 51 | 207.607428 |
| 125 | B3 | p0925 | 54 | T1:Water | 1.0 | 2.0 | 12.0 | 0.019 | 1.445 | 0.016 | ... | 31.0 | 45.0 | 52.0 | 57.0 | 59.0 | 59.0 | 65.0 | 86.0 | 69 | 207.607428 |
| 126 | B3 | p1079 | 60 | T1:Water | 2.5 | 5.0 | 12.0 | 0.000 | 0.488 | 0.008 | ... | 45.0 | 57.0 | 58.0 | 65.0 | 65.0 | 69.0 | 69.0 | 55.0 | 44 | 210.496317 |
| 127 | B3 | p1075 | 59 | T1:Water | 15.0 | 10.0 | 14.0 | 0.042 | 0.500 | 0.020 | ... | 40.0 | 52.0 | 57.0 | 65.0 | 65.0 | 65.0 | 69.0 | 54.0 | 43 | 209.385206 |
126 rows × 36 columns
# ggplot(FD, aes(x='Treatment', y=np.log10(FD['AVG_Retent_SPK']+1), fill = 'Block')) + geom_boxplot() + facet_grid('~Block') + flip_xlabels
ggplot(FD, aes(x='Block', y=np.log10(FD['AVG_Retent_SPK']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129428878349)>
# ggplot(FD, aes(x='Treatment', y=np.log10(FD['AVG_AdjShatt_SPK']+1), fill = 'Block')) + geom_boxplot() + facet_grid('~Block') + flip_xlabels
ggplot(FD, aes(x='Block', y=np.log10(FD['AVG_AdjShatt_SPK']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129429222789)>
# ggplot(FD, aes(x='Treatment', y=np.log10(FD['POT_Yld_SPK']+1), fill = 'Block')) + geom_boxplot() + facet_grid('~Block') + flip_xlabels
ggplot(FD, aes(x='Block', y=np.log10(FD['POT_Yld_SPK']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129430979069)>
# ggplot(FD, aes(x='Treatment', y=np.log10(FD['PCTG_YldLoss']+1), fill = 'Block')) + geom_boxplot() + facet_grid('~Block') + flip_xlabels
ggplot(FD, aes(x='Block', y=np.log10(FD['PCTG_YldLoss']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129428874493)>
# ggplot(FD, aes(x='Treatment', y=np.log10(FD['PCTG_YldLoss_SPK']+1), fill = 'Block')) + geom_boxplot() + facet_grid('~Block') + flip_xlabels
ggplot(FD, aes(x='Block', y=np.log10(FD['PCTG_YldLoss_SPK']+1), fill = 'Treatment')) + geom_boxplot() + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 1 rows containing non-finite values.
<ggplot: (129428920167)>
FD.columns
Index(['Block', 'Plot', 'Tray', 'Treatment', 'VisShatt', 'Range',
'Shaken_SPKS', 'Pre-Detached_SEED', 'TOTAL_Undetached', 'Detached_SEED',
'Undetached_SEED', 'NotesShake', 'AVG_Shatt_SPK', 'AVG_Retent_SPK',
'AVG_AdjShatt_SPK', 'POT_Yld_SPK', 'PCTG_YldLoss', 'PCTG_YldLoss_SPK',
'Dry_Unthreshed', 'Dry_Threshed', 'NotesDry', 'WET_wgt', 'SMC_Unthr',
'Est_Debris', 'Column', 'Row', 'G1_Apr07', 'G2_Apr16', 'G3_Apr19',
'G4_Apr21', 'G5_Apr23', 'G6_Apr28', 'G7_May03', 'Tallest',
'AverageHeight', 'AUC_Gust'],
dtype='object')
# Subset the data
# FD.columns.get_loc('AVG_AdjShatt_SPK')
# SubFD = FD.iloc[:, np.r_[0,2,15:19,23:26]]
# SubFD
SubFD = FD[['Block', 'Plot', 'Tray', 'Treatment','AVG_Shatt_SPK',
'AVG_Retent_SPK','AVG_AdjShatt_SPK', 'POT_Yld_SPK',
'PCTG_YldLoss', 'PCTG_YldLoss_SPK','WET_wgt','SMC_Unthr','Est_Debris','Tallest',
'AverageHeight', 'AUC_Gust']]
ToLog = ['AVG_Shatt_SPK', 'AVG_Retent_SPK','AVG_AdjShatt_SPK', 'POT_Yld_SPK', 'PCTG_YldLoss', 'PCTG_YldLoss_SPK','WET_wgt','SMC_Unthr']
LogSubFD = SubFD[ToLog].applymap(lambda x: np.log10(x+1))
# LogSubFD
SubFD = SubFD.drop(ToLog, axis=1)
# SubFD
LogSubFD = pd.concat([SubFD.reset_index(drop=True), LogSubFD], axis=1)
LogSubFD
| Block | Plot | Tray | Treatment | Est_Debris | Tallest | AverageHeight | AUC_Gust | AVG_Shatt_SPK | AVG_Retent_SPK | AVG_AdjShatt_SPK | POT_Yld_SPK | PCTG_YldLoss | PCTG_YldLoss_SPK | WET_wgt | SMC_Unthr | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B2 | p0391 | 21 | T1:Water | 0.115702 | 48.0 | 36 | 207.607428 | 0.008600 | 0.010512 | 0.010371 | 0.020637 | 0.111934 | 0.010512 | 0.185825 | 0.038872 |
| 1 | B2 | p0615 | 35 | T1:Water | 0.125683 | 64.0 | 50 | 210.385206 | 0.001662 | 0.005967 | 0.002007 | 0.007946 | 0.066699 | 0.005967 | 0.083503 | 0.055681 |
| 2 | B2 | p0655 | 39 | T1:Water | 0.217877 | 61.0 | 42 | 210.385206 | 0.003676 | 0.003496 | 0.004438 | 0.007899 | 0.040207 | 0.003496 | 0.078819 | 0.041591 |
| 3 | B2 | p0647 | 36 | T1:Water | 0.138462 | 56.0 | 45 | 209.162984 | 0.003425 | 0.011852 | 0.004844 | 0.016566 | 0.124504 | 0.011852 | 0.154424 | 0.036090 |
| 4 | B2 | p0445 | 24 | T1:Water | 0.155797 | 66.0 | 52 | 208.607428 | 0.001373 | 0.009769 | 0.001659 | 0.011391 | 0.104828 | 0.009769 | 0.117603 | 0.046316 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 123 | B2 | p0643 | 40 | T1:Water | 0.244770 | 68.0 | 52 | 209.829650 | 0.010463 | 0.006631 | 0.015602 | 0.022000 | 0.079181 | 0.006631 | 0.180986 | 0.031584 |
| 124 | B3 | p1009 | 57 | T1:Water | 0.128049 | 65.0 | 51 | 207.607428 | 0.000904 | 0.005502 | 0.001017 | 0.006506 | 0.061829 | 0.005502 | 0.071145 | 0.032881 |
| 125 | B3 | p0925 | 54 | T1:Water | 0.084211 | 86.0 | 69 | 207.607428 | 0.001265 | 0.020568 | 0.001370 | 0.021875 | 0.199206 | 0.020568 | 0.208710 | 0.031883 |
| 126 | B3 | p1079 | 60 | T1:Water | 0.421053 | 55.0 | 44 | 210.496317 | 0.000289 | 0.000615 | 0.000350 | 0.000964 | 0.007321 | 0.000615 | 0.010724 | 0.093422 |
| 127 | B3 | p1075 | 59 | T1:Water | 0.148148 | 54.0 | 43 | 209.385206 | 0.001919 | 0.001610 | 0.003966 | 0.005561 | 0.022016 | 0.001610 | 0.046885 | 0.022276 |
128 rows × 16 columns
%%time
sns.pairplot(LogSubFD, hue="Treatment")
Wall time: 1min 1s
<seaborn.axisgrid.PairGrid at 0x1e230dc21f0>
%%time
sns.pairplot(LogSubFD, hue="Block")
Wall time: 50 s
<seaborn.axisgrid.PairGrid at 0x1e2380dac70>
Chlo = pd.read_csv ('.\CURATED\PGRGH2021_Chloph_Compiled.csv')
print(Chlo.columns)
Chlo
Index(['Block', 'Plot', 'Tray', 'Column', 'Row', 'Treatment', 'G1_Apr07',
'G2_Apr16', 'G3_Apr19', 'G4_Apr21', 'G5_Apr23', 'G6_Apr28', 'G7_May03',
'Tallest', 'AverageHeight', 'F700_Lvl_1', 'F735_Lvl_1', 'CFR_1',
'Concentration_1', 'F700_Lvl_2', 'F735_Lvl_2', 'CFR_2',
'Concentration_2', 'Rep', 'VisShatt', 'Range', 'Shaken_SPKS',
'Pre-Detached_SEED', 'TOTAL_Undetached', 'Detached_SEED',
'Undetached_SEED', 'NotesShake', 'AVG_Shatt_SPK', 'AVG_Retent_SPK',
'AVG_AdjShatt_SPK', 'POT_Yld_SPK', 'PCTG_YldLoss', 'PCTG_YldLoss_SPK',
'Dry_Unthreshed', 'Dry_Threshed', 'NotesDry', 'WET_wgt', 'SMC_Unthr',
'Est_Debris', 'AUC_Gust'],
dtype='object')
| Block | Plot | Tray | Column | Row | Treatment | G1_Apr07 | G2_Apr16 | G3_Apr19 | G4_Apr21 | ... | POT_Yld_SPK | PCTG_YldLoss | PCTG_YldLoss_SPK | Dry_Unthreshed | Dry_Threshed | NotesDry | WET_wgt | SMC_Unthr | Est_Debris | AUC_Gust | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B1 | p0109 | 7 | 4 | 8 | T2:AVG_Low | 32 | 45 | 45 | 54 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 207.718539 |
| 1 | B1 | p0109 | 7 | 4 | 8 | T2:AVG_Low | 32 | 45 | 45 | 54 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 207.718539 |
| 2 | B1 | p0109 | 7 | 4 | 8 | T2:AVG_Low | 32 | 45 | 45 | 54 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 207.718539 |
| 3 | B1 | p0139 | 7 | 4 | 10 | T7:PrhxCa_Med | 40 | 53 | 55 | 65 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 209.496317 |
| 4 | B1 | p0139 | 7 | 4 | 10 | T7:PrhxCa_Med | 40 | 53 | 55 | 65 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 209.496317 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 238 | B3 | p0939 | 53 | 9 | 15 | T1:Water | 40 | 52 | 61 | 65 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 209.385206 |
| 239 | B3 | p0939 | 53 | 9 | 15 | T1:Water | 40 | 52 | 61 | 65 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 209.385206 |
| 240 | B3 | p0969 | 53 | 9 | 17 | T8:PrhxCa_High | 40 | 45 | 52 | 52 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 208.607428 |
| 241 | B3 | p0969 | 53 | 9 | 17 | T8:PrhxCa_High | 40 | 45 | 52 | 52 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 208.607428 |
| 242 | B3 | p0969 | 53 | 9 | 17 | T8:PrhxCa_High | 40 | 45 | 52 | 52 | ... | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | NaN | 208.607428 |
243 rows × 45 columns
ggplot(Chlo, aes(x='Treatment', y=Chlo['Concentration_1'], fill = 'Treatment')) + geom_boxplot(aes(x='Treatment', y=Chlo['Concentration_1'])) + facet_grid('Block~') + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 27 rows containing non-finite values.
<ggplot: (129525288837)>
ggplot(Chlo, aes(x='Treatment', y=Chlo['Concentration_1'], fill = 'Treatment')) + geom_boxplot(aes(x='Treatment', y=Chlo['Concentration_1'])) + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 27 rows containing non-finite values.
<ggplot: (129525562811)>
ggplot(Chlo, aes(x='Treatment', y=Chlo['Concentration_2'], fill = 'Treatment')) + geom_boxplot(aes(x='Treatment', y=Chlo['Concentration_2'])) + flip_xlabels
C:\Users\jbarreto\Anaconda3\lib\site-packages\plotnine\layer.py:324: PlotnineWarning: stat_boxplot : Removed 27 rows containing non-finite values.
<ggplot: (129525768554)>
# Set max number of rows to visualize
pd.set_option('display.max_rows', 30)
Chlo.groupby(['Treatment'])['Concentration_1'].describe()
| count | mean | std | min | 25% | 50% | 75% | max | |
|---|---|---|---|---|---|---|---|---|
| Treatment | ||||||||
| T1:Water | 21.0 | 478.238095 | 59.999921 | 345.0 | 453.00 | 478.0 | 522.00 | 598.0 |
| T2:AVG_Low | 24.0 | 462.083333 | 66.202533 | 313.0 | 432.25 | 456.0 | 517.50 | 560.0 |
| T3:AVG_Med | 24.0 | 413.125000 | 77.831654 | 262.0 | 368.25 | 408.0 | 460.50 | 548.0 |
| T4:AVG_High | 24.0 | 466.083333 | 100.919217 | 237.0 | 425.50 | 475.0 | 536.50 | 643.0 |
| T5:ETH | 24.0 | 472.583333 | 56.014685 | 370.0 | 429.00 | 484.5 | 522.00 | 560.0 |
| T6:PrhxCa_Low | 24.0 | 478.541667 | 71.641608 | 332.0 | 430.75 | 494.0 | 526.75 | 611.0 |
| T7:PrhxCa_Med | 24.0 | 484.583333 | 43.852437 | 427.0 | 455.75 | 475.0 | 498.50 | 592.0 |
| T8:PrhxCa_High | 24.0 | 470.375000 | 42.621502 | 414.0 | 444.50 | 462.5 | 495.75 | 573.0 |
| T9:GA3 | 27.0 | 448.148148 | 61.484022 | 313.0 | 434.00 | 459.0 | 487.50 | 535.0 |
Chlo.groupby(['Treatment'])['Concentration_2'].describe()
| count | mean | std | min | 25% | 50% | 75% | max | |
|---|---|---|---|---|---|---|---|---|
| Treatment | ||||||||
| T1:Water | 21.0 | 456.190476 | 75.161572 | 338.0 | 402.00 | 453.0 | 484.00 | 617.0 |
| T2:AVG_Low | 24.0 | 482.916667 | 56.652961 | 383.0 | 446.00 | 491.0 | 519.25 | 573.0 |
| T3:AVG_Med | 24.0 | 455.708333 | 71.975527 | 281.0 | 416.25 | 452.5 | 516.00 | 579.0 |
| T4:AVG_High | 24.0 | 452.875000 | 61.068253 | 338.0 | 411.00 | 456.0 | 478.00 | 605.0 |
| T5:ETH | 24.0 | 525.541667 | 50.280932 | 421.0 | 500.00 | 541.5 | 567.00 | 598.0 |
| T6:PrhxCa_Low | 24.0 | 477.041667 | 52.455761 | 376.0 | 446.00 | 484.0 | 511.50 | 592.0 |
| T7:PrhxCa_Med | 24.0 | 509.708333 | 45.313861 | 421.0 | 482.50 | 497.0 | 538.25 | 598.0 |
| T8:PrhxCa_High | 24.0 | 476.041667 | 67.191795 | 281.0 | 462.00 | 487.5 | 504.75 | 598.0 |
| T9:GA3 | 27.0 | 481.888889 | 56.889456 | 351.0 | 446.50 | 491.0 | 525.50 | 560.0 |
GustH = pd.read_csv ('.\CURATED\PGRGH2021_GustHgt_Compiled.csv')
print(GustH.columns)
GustH
Index(['Block', 'Plot', 'Tray', 'Treatment', 'VisShatt', 'Range',
'Shaken_SPKS', 'Pre-Detached_SEED', 'TOTAL_Undetached', 'Detached_SEED',
'Undetached_SEED', 'NotesShake', 'AVG_Shatt_SPK', 'AVG_Retent_SPK',
'AVG_AdjShatt_SPK', 'POT_Yld_SPK', 'PCTG_YldLoss', 'PCTG_YldLoss_SPK',
'Dry_Unthreshed', 'Dry_Threshed', 'NotesDry', 'WET_wgt', 'SMC_Unthr',
'Est_Debris', 'Column', 'Row', 'G1_Apr07', 'G2_Apr16', 'G3_Apr19',
'G4_Apr21', 'G5_Apr23', 'G6_Apr28', 'G7_May03', 'Tallest',
'AverageHeight', 'AUC_Gust'],
dtype='object')
| Block | Plot | Tray | Treatment | VisShatt | Range | Shaken_SPKS | Pre-Detached_SEED | TOTAL_Undetached | Detached_SEED | ... | G1_Apr07 | G2_Apr16 | G3_Apr19 | G4_Apr21 | G5_Apr23 | G6_Apr28 | G7_May03 | Tallest | AverageHeight | AUC_Gust | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B1 | p0001 | 1 | T5:ETH | NaN | NaN | NaN | NaN | NaN | NaN | ... | 40.0 | 53.0 | 57.0 | 55.0 | 61.0 | 65.0 | 69.0 | 34.0 | 25 | 209.496317 |
| 1 | B1 | p0003 | 1 | T4:AVG_High | NaN | NaN | NaN | NaN | NaN | NaN | ... | 40.0 | 54.0 | 54.0 | 65.0 | 65.0 | 65.0 | 69.0 | 52.0 | 40 | 209.607428 |
| 2 | B1 | p0005 | 2 | T7:PrhxCa_Med | NaN | NaN | NaN | NaN | NaN | NaN | ... | 32.0 | 45.0 | 52.0 | 52.0 | 55.0 | 59.0 | 69.0 | 36.0 | 26 | 207.718539 |
| 3 | B1 | p0007 | 3 | T6:PrhxCa_Low | NaN | NaN | NaN | NaN | NaN | NaN | ... | 32.0 | 51.0 | 54.0 | 57.0 | 58.0 | 65.0 | 69.0 | 51.0 | 41 | 208.385206 |
| 4 | B1 | p0009 | 3 | T3:AVG_Med | NaN | NaN | NaN | NaN | NaN | NaN | ... | 40.0 | 45.0 | 45.0 | 65.0 | 53.0 | 57.0 | 69.0 | 59.0 | 48 | 208.607428 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 535 | B3 | p1071 | 57 | T9:GA3 | NaN | NaN | NaN | NaN | NaN | NaN | ... | 32.0 | 56.0 | 61.0 | 65.0 | 65.0 | 65.0 | 69.0 | 78.0 | 56 | 208.940761 |
| 536 | B3 | p1073 | 58 | T6:PrhxCa_Low | 2.5 | 5.0 | 13.0 | 0.001 | 0.920 | 0.026 | ... | 45.0 | 53.0 | 56.0 | 65.0 | 65.0 | 65.0 | 69.0 | 57.0 | 42 | 210.051872 |
| 537 | B3 | p1075 | 59 | T1:Water | 15.0 | 10.0 | 14.0 | 0.042 | 0.500 | 0.020 | ... | 40.0 | 52.0 | 57.0 | 65.0 | 65.0 | 65.0 | 69.0 | 54.0 | 43 | 209.385206 |
| 538 | B3 | p1077 | 59 | T7:PrhxCa_Med | 2.5 | 5.0 | 13.0 | 0.023 | 0.798 | 0.032 | ... | 32.0 | 45.0 | 51.0 | 53.0 | 53.0 | 61.0 | 65.0 | 46.0 | 33 | 207.718539 |
| 539 | B3 | p1079 | 60 | T1:Water | 2.5 | 5.0 | 12.0 | 0.000 | 0.488 | 0.008 | ... | 45.0 | 57.0 | 58.0 | 65.0 | 65.0 | 69.0 | 69.0 | 55.0 | 44 | 210.496317 |
540 rows × 36 columns
# Calculate the area under the curve to the a unique score for development.
GustH['AUC_Gust'] = ( ( np.mean(10 + GustH['G1_Apr07']) / 23 ) +
( (GustH['G1_Apr07'] + GustH['G2_Apr16']) / 9 ) +
( np.mean(GustH['G2_Apr16'] + GustH['G3_Apr19']) / 3 ) +
( np.mean(GustH['G3_Apr19'] + GustH['G4_Apr21']) / 2 ) )
# Set max number of rows to visualize
pd.set_option('display.max_rows', 30)
GustH.groupby(['Treatment'])['AUC_Gust'].describe()
| count | mean | std | min | 25% | 50% | 75% | max | |
|---|---|---|---|---|---|---|---|---|
| Treatment | ||||||||
| T1:Water | 58.0 | 104.131759 | 0.975262 | 101.949766 | 103.421989 | 104.283100 | 104.810878 | 106.838655 |
| T2:AVG_Low | 58.0 | 103.886548 | 0.951069 | 101.949766 | 103.283100 | 103.783100 | 104.477544 | 106.060878 |
| T3:AVG_Med | 57.0 | 103.803568 | 0.925620 | 101.949766 | 103.283100 | 103.616433 | 104.505322 | 106.394211 |
| T4:AVG_High | 58.0 | 103.846318 | 0.975743 | 101.949766 | 103.199766 | 103.671989 | 104.616433 | 105.727544 |
| T5:ETH | 58.0 | 103.844402 | 0.884106 | 102.505322 | 103.310878 | 103.505322 | 104.505322 | 105.616433 |
| T6:PrhxCa_Low | 58.0 | 103.888464 | 0.959472 | 102.060878 | 103.394211 | 103.616433 | 104.394211 | 106.838655 |
| T7:PrhxCa_Med | 57.0 | 103.735342 | 1.053017 | 100.060878 | 103.283100 | 103.727544 | 104.505322 | 105.171989 |
| T8:PrhxCa_High | 57.0 | 103.715848 | 0.881838 | 101.949766 | 103.283100 | 103.505322 | 104.394211 | 105.283100 |
| T9:GA3 | 58.0 | 104.325245 | 0.959394 | 102.060878 | 103.533100 | 104.505322 | 105.060878 | 105.838655 |
GustH_long = pd.melt(GustH, id_vars=['Block', 'Plot', 'Tray', 'Column', 'Row', 'Treatment','Tallest', 'AverageHeight','AUC_Gust'], value_vars=['G1_Apr07','G2_Apr16', 'G3_Apr19', 'G4_Apr21', 'G5_Apr23', 'G6_Apr28', 'G7_May03'], var_name='Date', value_name='Gustavsson')
GustH_long
| Block | Plot | Tray | Column | Row | Treatment | Tallest | AverageHeight | AUC_Gust | Date | Gustavsson | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | B1 | p0001 | 1 | 1 | 1 | T5:ETH | 34.0 | 25 | 104.394211 | G1_Apr07 | 40.0 |
| 1 | B1 | p0003 | 1 | 3 | 1 | T4:AVG_High | 52.0 | 40 | 104.505322 | G1_Apr07 | 40.0 |
| 2 | B1 | p0005 | 2 | 5 | 1 | T7:PrhxCa_Med | 36.0 | 26 | 102.616433 | G1_Apr07 | 32.0 |
| 3 | B1 | p0007 | 3 | 7 | 1 | T6:PrhxCa_Low | 51.0 | 41 | 103.283100 | G1_Apr07 | 32.0 |
| 4 | B1 | p0009 | 3 | 9 | 1 | T3:AVG_Med | 59.0 | 48 | 103.505322 | G1_Apr07 | 40.0 |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 3775 | B3 | p1071 | 57 | 6 | 24 | T9:GA3 | 78.0 | 56 | 103.838655 | G7_May03 | 69.0 |
| 3776 | B3 | p1073 | 58 | 8 | 24 | T6:PrhxCa_Low | 57.0 | 42 | 104.949766 | G7_May03 | 69.0 |
| 3777 | B3 | p1075 | 59 | 10 | 24 | T1:Water | 54.0 | 43 | 104.283100 | G7_May03 | 69.0 |
| 3778 | B3 | p1077 | 59 | 12 | 24 | T7:PrhxCa_Med | 46.0 | 33 | 102.616433 | G7_May03 | 65.0 |
| 3779 | B3 | p1079 | 60 | 14 | 24 | T1:Water | 55.0 | 44 | 105.394211 | G7_May03 | 69.0 |
3780 rows × 11 columns
ggplot(Chlo, aes(x='Treatment', y=np.log10(Chlo['AUC_Gust']), fill = 'Treatment')) + geom_boxplot(aes(x='Treatment', y=Chlo['AUC_Gust'])) + flip_xlabels
<ggplot: (129524148818)>
ggplot(GustH_long, aes(x='Date', y=GustH_long['Treatment'], fill = 'Gustavsson')) + geom_tile() + theme(figure_size=(12,8))
<ggplot: (129431107464)>
# Set max number of rows to visualize
pd.set_option('display.max_rows', 20)
GustH_long.groupby(['Block', 'Treatment']).size()
Block Treatment
B1 T1:Water 140
T2:AVG_Low 140
T3:AVG_Med 140
T4:AVG_High 140
T5:ETH 140
...
B3 T5:ETH 140
T6:PrhxCa_Low 140
T7:PrhxCa_Med 140
T8:PrhxCa_High 140
T9:GA3 140
Length: 27, dtype: int64